/**
 * Created by user on 2016/11/24.
 */
import React from 'react';
import {Form, Input, Button, Select, Table, Modal, Popover, Pagination, Message, Icon, DatePicker, Row, Col, Checkbox,Tabs, Upload  } from 'antd';
const FormItem = Form.Item;
const Option = Select.Option;
const TabPane = Tabs.TabPane

let List =React.createClass({

  getInitialState() {
    return {
      visible: false,
      data: [],
      record:[],
      loanData:[]
    }
  },
  rowKey(data) {
    console.log(data);
    return data.id;
  },
  componentWillReceiveProps(nextProps) {
    this.setState({
      visible: nextProps.visible,
      record: nextProps.record,
      loanData: nextProps.loanData
    })
  },
  handleSubmit() {
    let forms = this.props.form.getFieldsValue();
    forms.loanTime = Utils.formatDate(forms.loanTime);
    let record = this.state.record;
    console.log(record);
    let param = Object.assign({},{id: record.id},forms);
    let _me = this;
    Utils.sendAjax({
      url:  '/funder/finance/loan',
      data: JSON.stringify(param),
      callback: function (result) {
        if(result.code == '200') {
        Message.success(result.message);
          _me.handleCancel();
        }else {
          Message.error(result.message, 10);
        }
      }
    })
  },
  handleReset(){
    this.props.form.resetFields();
  },
  handleCancel() {
    this.setState({
      visible: false
    })
    this.props.callHide();
    this.handleReset();
  },
   getImgList(img){
    let arry = [];
    if(img){
      img.forEach((item,index) => {
        let obj = {
          uid: index,
          url: item
        }
        arry.push(obj);
      });
      console.log(arry)
    }
    return arry;
  },
    messageInfo() {
    Message.warning('图片不可删除');

  },
  onCancel() {
  this.setState({
    priviewVisible: false,
  })
},
  render() {
    const { getFieldProps } = this.props.form;
    let loanData = this.props.loanData ? this.props.loanData : '';
    let applyDetail = loanData.apply ? loanData.apply : '';
    let rentDetail = loanData.rent ? loanData.rent : '';
    let verifyDetail = loanData.verify ? loanData.verify : '';
    let loanDetail = loanData.loan ? loanData.loan : '';
    let tenementDetail = loanData.tenement ? loanData.tenement : '';
    let userInfoDetail = loanData.userInfo ? loanData.userInfo :　 '';
    const _me = this;
    console.log(loanData);
    let record = this.state.record;
    console.log(record)

    // const loanAmountProps = getFieldProps('loanAmount',{initialValue: applyDetail.isLoan== 2 ? '' : loanDetail.loanAmount,rules: [{required: true, message: '放款金额不能为空'}]});
    // const contactUserProps = getFieldProps('contactUser',{initialValue: applyDetail.isLoan== 2 ? '' :loanDetail.contactUser,rules: [{required: true, message: '联系人不能为空'}]});
    // const funderUserNameProps = getFieldProps('funderUserName',{initialValue: applyDetail.isLoan== 2 ? '' :loanDetail.funderUserName,rules: [{required: true, message: '资金方账号不能为空'}]});
    // const contactPhoneProps = getFieldProps('contactPhone',{initialValue:applyDetail.isLoan== 2 ? '' : loanDetail.contactPhone,rules: [{required: true, message: '联系方式不能为空'}]});
    // const funderRemarkProps = getFieldProps('funderRemark',{initialValue:applyDetail.isLoan== 2 ? '' : loanDetail.funderRemark});
    // const loanTimeProps = getFieldProps('loanTime',{initialValue: applyDetail.isLoan== 2 ? null : loanDetail.loanTime,rules: [{required: true, message: '放款时间不能为空'}]});
    // const statusProps = getFieldProps('isLoan',{initialValue: applyDetail.isLoan== 2 ? '1': applyDetail.isLoan == 1 ? '已放款' : '拒绝放款'});


     const amountProps = getFieldProps('amount',{initialValue: verifyDetail.amount,rules:[{required: true, message: '批贷金额不能为空'}]});
    const interestRateProps = getFieldProps('interestRate',{initialValue: verifyDetail.interestRate,rules: [{required: true, message: '批贷利率不能为空'}]});
    const periodProps = getFieldProps('period',{initialValue: verifyDetail.period,rules: [{required: true, message: '批贷期限不能为空'}]});
    const serviceRateProps = getFieldProps('serviceRate',{initialValue: verifyDetail.serviceRate});
    const remarkProps = getFieldProps('remark',{initialValue: verifyDetail.remark});
    const repaymentTypeProps = getFieldProps('repaymentType',{initialValue: verifyDetail.repaymentType,rules: [{required: true, message: '还款方式不能为空'}]});
    const purposeProps = getFieldProps('purpose', {initialValue: applyDetail.purpose})

 let approve = applyDetail.financeApproveList ? applyDetail.financeApproveList : [];
    let fys = '';
    let zfs = '';
    let jks = '';
    let sqs = '';
    let rzs = '';
    let fxs = '';
    let fysRemark = '';
    let zfsRemark = '';
    let jksRemark = '';
    let sqsRemark = '';
    let rzsRemark = '';
    let fxsRemark = '';
       approve.map((item)=> {
        if (item.name == '房源真实性') {
            fys =  item.status;
            fysRemark = item.remark;
        }else if(item.name == '租房真实性') {
              zfs = item.status
              zfsRemark = item.remark;
        }else if (item.name == '借款人资信') {
              jks = item.status
              jksRemark = item.remark;
        }else if (item.name == '双签确认') {
              sqs = item.status  
              sqsRemark = item.remark; 
        }else if (item.name == '入账账户确认') {
              rzs = item.status
              rzsRemark = item.remark;
        }else if (item.name == '房源风险度') {
              fxs = item.status
              fxsRemark = item.remark
        }
    })

   let urlList = {
      name: 'file',
      data: {nid: 'urlList'},
      listType: 'picture-card',
      action: Utils.apiServer + '/img/uploadifySave',
      multiple: true,
      fileList: this.state.loanData.urlList ? this.getImgList(this.state.loanData.urlList) :  [],
      
       
      onPreview: (file) => {
        _me.setState({
           priviewImage: file.url,
          priviewVisible: true,
        });
      },
      onRemove: (file) => {
        _me.messageInfo()
      }
    };


    const columns = [
      {
        title: '租约开始时间',
        dataIndex: 'startTime',
        width: 150,
      },
      {
        title: '租约结束时间',
        dataIndex: 'expireTime',
        width: 150,
      },
      {
        title: '租金',
        dataIndex: 'rent',
        width: 150,
      },
    ]
    const value = {
      'installment' : '等额本息',
      'onetime' : '一次性还本付息',
      'month' : '先息后本',
      'monthCapital' : '等本金'
    }
    return (
      <Modal title="放款详情" visible={this.state.visible} onCancel={this.handleCancel} width={900} footer="">
       <Tabs type="card"  onChange={this.handleTabChange}>
         <TabPane tab="贷款详情" key="1">
        <Form inline>
        <div className="form-group">
         <h3><span>房东信息</span></h3>
        <div>
          <Row gutter={24}>
              <Col sm={8}>
                <FormItem label="房东姓名">
                  <span>{userInfoDetail.realName}</span>
                </FormItem>
              </Col>
              <Col sm={8}>
                <FormItem label="联系方式">
                  <span>{userInfoDetail.mobilePhone}</span>
                </FormItem>
              </Col>
              <Col sm={8}>
                <FormItem label="有效证件号">
                  <span>{userInfoDetail.cardNo}</span>
                </FormItem>
              </Col>
            </Row>
            <Row gutter={24}>
              <Col sm={8}>
                <FormItem label="联系地址">
                  <span>{userInfoDetail.address}</span>
                </FormItem>
              </Col>
              <Col sm={8}>
                <FormItem label="紧急联系人">
                  <span>{userInfoDetail.urgencyContacts}</span>
                </FormItem>
              </Col>
              <Col sm={8}>
                <FormItem label="紧急人联系方式">
                  <span>{userInfoDetail.urgencyPhone}</span>
                </FormItem>
              </Col>
            </Row>
             <Row gutter={24}>
              <Col sm={8}>
                <FormItem label="收款方户名">
                  <span>{userInfoDetail.payeeName}</span>
                </FormItem>
              </Col>
              <Col sm={8}>
                <FormItem label="开户行">
                  <span>{userInfoDetail.bankName}</span>
                </FormItem>
              </Col>
              <Col sm={8}>
                <FormItem label="收款账号">
                  <span>{userInfoDetail.payeeAccount}</span>
                </FormItem>
              </Col>
            </Row>
        </div>
          <h3><span>房屋情况</span></h3>
          {applyDetail.type == '101' ? <div>
            <Row gutter={24}>
              <Col sm={8}>
                <FormItem label="房屋地址">
                  <span>{tenementDetail.address}</span>
                </FormItem>
              </Col>
              <Col sm={8}>
                <FormItem label="房屋租金">
                  <span>{`${tenementDetail.rent}元`}</span>
                </FormItem>
              </Col>
              <Col sm={8}>
                <FormItem label="租约期限">
                  <span>{`${tenementDetail.period}个月`}</span>
                </FormItem>
              </Col>
            </Row>
            <Row gutter={24}>
              <Col sm={8}>
                <FormItem label="租约开始时间">
                  <span>{tenementDetail.startTime}</span>
                </FormItem>
              </Col>
            </Row>
          </div> : <div>
            {tenementDetail.paymentWay == 1 ?
              <div>
                <Row gutter={24}>
                  <Col sm={8}>
                    <FormItem label="房屋地址">
                      <span>{tenementDetail.address}</span>
                    </FormItem>
                  </Col>
                  <Col sm={8}>
                    <FormItem label="房屋租金">
                      <span>{`${tenementDetail.rent}元`}</span>
                    </FormItem>
                  </Col>
                  <Col sm={8}>
                    <FormItem label="付款方式">
                      <span>{tenementDetail.rentPeriod == 3 ? '一季度' : tenementDetail.rentPeriod == 6 ? '半年' : '一年'}</span>
                    </FormItem>
                  </Col>
                </Row>
                <Row gutter={24}>

                  <Col sm={8}>
                    <FormItem label="租约期限">
                      <span>{`${tenementDetail.period}个月`}</span>
                    </FormItem>
                  </Col>
                  <Col sm={8}>
                    <FormItem label="租约开始时间">
                      <span>{tenementDetail.startTime}</span>
                    </FormItem>
                  </Col>
                  <Col sm={8}>
                    <FormItem label="租约结束时间">
                      <span>{tenementDetail.endTime}</span>
                    </FormItem>
                  </Col>
                </Row>
              </div>
              :
              <div>
                <Row gutter={24}>
                  <Col sm={8}>
                    <FormItem label="房屋地址">
                      <span>{tenementDetail.address}</span>
                    </FormItem>
                  </Col>
                  <Col sm={8}>
                    <FormItem label="租约期限">
                      <span>{`${tenementDetail.period}个月`}</span>
                    </FormItem>
                  </Col>
                  <Col sm={8}>
                    <FormItem label="付款方式">
                      <span>{tenementDetail.rentPeriod == 3 ? '一季度' : tenementDetail.rentPeriod == 6 ? '半年' : '一年'}</span>
                    </FormItem>
                  </Col>
                </Row>
                <Row gutter={24}>
                  <Col offset={1} sm={20}>
                    <Table rowKey={this.rowKey} columns={columns} dataSource={tenementDetail.tenementRentList}
                           scroll={{x: 500, y: 100 }}
                           pagination={false}/>
                  </Col>
                </Row>
              </div>
            }

          </div> }
          {applyDetail.type == '101' || applyDetail.type == '102' ? '' : <div>
            <h3><span>租客情况</span></h3>
            <Row gutter={24}>
              <Col sm={8}>
                <FormItem label="租客姓名">
                  <span>{rentDetail.renterName}</span>
                </FormItem>
              </Col>
              <Col sm={8}>
                <FormItem label="付款方式">
                  <span>{`押${rentDetail.depositPeriod ? rentDetail.depositPeriod : 0}付${rentDetail.rentPeriod ? rentDetail.rentPeriod : 0}`}</span>
                </FormItem>

              </Col>
              <Col sm={8}>
                <FormItem label="租客月租金">
                  <span>{`${rentDetail.rent}元`}</span>
                </FormItem>
              </Col>
            </Row>
            <Row gutter={24}>
              <Col sm={8}>
                <FormItem label="租约开始时间">
                  <span>{rentDetail.startTime}</span>
                </FormItem>
              </Col>
              <Col sm={8}>
                <FormItem label="租约结束时间">
                  <span>{rentDetail.endTime}</span>
                </FormItem>
              </Col>
              <Col sm={8}>
                <FormItem label="租约期限">
                  <span>{`${rentDetail.period}个月`}</span>
                </FormItem>
              </Col>
            </Row>
            <Row gutter={24}>
              <Col sm={8}>
                <FormItem label="是否整租">
                  <span>{rentDetail.isShared == '1' ? '是' : '否'}</span>
                </FormItem>
              </Col>
            </Row>
          </div>}
          <h3><span>贷款情况</span></h3>
          <Row gutter={24}>
            <Col sm={8}>
              <FormItem label="借款类型">
                <span>{applyDetail.type == '101'? '收房贷' : applyDetail.type == '102' ? '装修贷' : '租约贷'}</span>
              </FormItem>
            </Col>
            <Col sm={8}>
              <FormItem label="借款金额">
                <span>{`${applyDetail.applyAmount}元`}</span>
              </FormItem>
            </Col>
            <Col sm={8}>
              <FormItem label="借款期限">
                <span>{`${applyDetail.applyPeriod}个月`}</span>
              </FormItem>
            </Col>
          </Row>
          <Row gutter={24}>
            <Col sm={8}>
              <FormItem label="联系人">
                <span>{applyDetail.contactUser}</span>
              </FormItem>
            </Col>
            <Col sm={8}>
              <FormItem label="联系电话">
                <span>{applyDetail.contractPhone}</span>
              </FormItem>
            </Col>
          </Row>
          <Row gutter={24}>
            <Col sm={24}>
                <FormItem label="借款用途">
                    <Input type="textarea" {...purposeProps}  disabled={applyDetail.status == 2 ? false : true} style={{width: 500}}/>
                </FormItem>
            </Col>
          </Row>
            <h3><span>审批情况</span></h3>
             <Row gutter={24}>
          <Col sm={24}>
            <table style={{ width: '90%', marginLeft: 25 }} className="addTable" ref="addTable">
              <thead>
                <tr>
                  <td>风控审查项</td>
                  <td>已审查</td>
                  <td>未审查</td>
                  <td>备注</td>
                </tr>
              </thead>
              <tbody>
                <tr>
                  <td>房源真实性</td>
                  <td>
                    <FormItem>
                
                        <Checkbox checked={fys == 1 ? true : false} disabled></Checkbox> 
                    
                    </FormItem>
                  </td>
                  <td>
                    <FormItem>
                   
                        <Checkbox checked={fys == -1 ? true : false}  disabled></Checkbox>
             
                      
                    </FormItem>
                  </td>
                  <td>
                    <FormItem>
                      <Input {...getFieldProps('fy',{initialValue:  applyDetail.status == 2  ? '' : fysRemark})} disabled={applyDetail.status == 2 ? false : true}/>
                    </FormItem>
                  </td>
                </tr>
                  <tr>
                  <td>租房真实性</td>
                  <td>
                    <FormItem>
                 
                      <Checkbox checked={zfs == 1 ? true : false} disabled></Checkbox>
                  
                     
                    </FormItem>
                  </td>
                  <td>
                    <FormItem>
                   
                      <Checkbox checked={zfs == -1 ? true : false} disabled></Checkbox>
                
                    </FormItem>
                  </td>
                  <td>
                    <FormItem>
                      <Input {...getFieldProps('zf',{initialValue: applyDetail.status == 2 ? '' : zfsRemark})} disabled={applyDetail.status == 2 ? false : true}/>
                    </FormItem>
                  </td>
                </tr>
                  <tr>
                  <td>借款人资信</td>
                  <td>
                    <FormItem>
               
                       <Checkbox checked={jks == 1 ? true : false} disabled></Checkbox>
                
                      
                    </FormItem>
                  </td>
                  <td>
                    <FormItem>
               
                        <Checkbox checked={jks == -1 ? true : false} disabled></Checkbox>
             
                     
                    </FormItem>
                  </td>
                  <td>
                    <FormItem>
                      <Input {...getFieldProps('jk',{initialValue: applyDetail.status == 2 ? '' : jksRemark})} disabled={applyDetail.status == 2 ? false : true}/>
                    </FormItem>
                  </td>
                </tr>
                  <tr>
                  <td>双签确认</td>
                  <td>
                    <FormItem>
                
                      <Checkbox checked={sqs == 1 ? true : false} disabled></Checkbox>
              
                      
                    </FormItem>
                  </td>
                  <td>
                    <FormItem>
                  
                        <Checkbox checked={sqs == -1 ? true : false} disabled></Checkbox>
                 
                     
                    </FormItem>
                  </td>
                  <td>
                    <FormItem>
                      <Input {...getFieldProps('sq',{initialValue: applyDetail.status == 2 ? '' : sqsRemark})} disabled={applyDetail.status == 2 ? false : true}/>
                    </FormItem>
                  </td>
                </tr>
                  <tr>
                  <td>入账账户确认</td>
                  <td>
                    <FormItem>
               
                        <Checkbox checked={rzs == 1 ? true : false} disabled></Checkbox>
            
                      
                    </FormItem>
                  </td>
                  <td>
                    <FormItem>
                
                       <Checkbox checked={rzs == -1 ? true : false} disabled></Checkbox>
                  
                      
                    </FormItem>
                  </td>
                  <td>
                    <FormItem>
                      <Input {...getFieldProps('rz',{initialValue: applyDetail.status == 2 ? '' : rzsRemark})} disabled={applyDetail.status == 2 ? false : true}/>
                    </FormItem>
                  </td>
                </tr>
                  <tr>
                  <td>房源风险度</td>
                  <td>
                    <FormItem>
               
                        <Checkbox checked={fxs == 1 ? true : false} disabled></Checkbox>
           
                      
                    </FormItem>
                  </td>
                  <td>
                    <FormItem>
            
                      <Checkbox checked={fxs == -1 ? true : false} disabled></Checkbox>
     
                      
                    </FormItem>
                  </td>
                  <td>
                    <FormItem>
                      <Input {...getFieldProps('fx',{initialValue: applyDetail.status == 2 ? '' : fxsRemark})} disabled={applyDetail.status == 2 ? false : true}/>
                    </FormItem>
                  </td>
                </tr>
              </tbody>
            </table>
          </Col>
        </Row>
          <Row gutter={24}>
            <Col sm={12}>
              <FormItem label="批贷金额(元)">
                <Input {...amountProps} placeholder="批贷金额" disabled={applyDetail.status == 2 ? false : true}/>
              </FormItem>
            </Col>
            <Col sm={12}>
              <FormItem label="批贷利率(%)">
                <Input {...interestRateProps} placeholder="批贷利率" disabled={applyDetail.status == 2 ? false : true}/>
              </FormItem>
            </Col>
          </Row>
          <Row gutter={24}>
            <Col sm={12}>
              <FormItem label="还款方式">
                <Select {...repaymentTypeProps} placeholder="还款方式" style={{width: 162}} disabled={applyDetail.status == 2 ? false : true}>
                  <Option value="installment">等额本息</Option>
                  <Option value="onetime">一次性还本付息</Option>
                  <Option value="month">先息后本</Option>
                  <Option value="monthCapital">等本金</Option>
                </Select>
              </FormItem>
            </Col>
            <Col sm={12}>
              <FormItem label="批贷期限(月)">
                <Input {...periodProps} placeholder="批贷期限" disabled={applyDetail.status == 2 ? false : true}/>
              </FormItem>
            </Col>
          </Row>
          <Row gutter={24}>
              <Col sm={12}>
                <FormItem label="(前置)服务费率(%)">
                  <Input {...serviceRateProps} placeholder="(前置)服务费率" disabled={applyDetail.status == 2 ? false : true}/>
                </FormItem>
              </Col>
              <Col sm={12}>
                <FormItem label="服务费(元)">
         
                  <Input  placeholder="服务费" value={!verifyDetail.amount&&!verifyDetail.serviceRate ? '' : (verifyDetail.amount * (verifyDetail.serviceRate*0.01)*(verifyDetail.period/12)).toFixed(2) <0.01 ? 0.01 : (verifyDetail.amount * (verifyDetail.serviceRate*0.01)*(verifyDetail.period/12)).toFixed(2)}  disabled />
                
                   
                </FormItem>
              </Col>
          </Row>
        </div>
        </Form>
        </TabPane>
         <TabPane tab="附件资料" key="2">
              <div className="form-group">
            {/**<h3><span>附件上传</span></h3> */}
            <p className="img-tips">提示：图片为png和jpg格式，且不大于5M</p>
            <Row gutter={24} className="pic-box">
              <Col sm={3}>

                <p className="label-text">附件上传：</p>
              </Col>
              <Col sm={21}>
              <div className="addPics">
                <Upload  {...urlList}  disabled>
                   <div className="img-icon">
                    <Icon type="plus"/>
                    <h5>添加图片</h5>
                  <Modal visible={this.state.priviewVisible} footer={null} onCancel={this.onCancel}>
                    <img alt="example" src={this.state.priviewImage} width="500"/>
                  </Modal>
                  </div>
                </Upload>
              </div>
              </Col>
            </Row>
            </div>
              </TabPane>
              <TabPane tab="放款管理" key="3">
              <Form inline form={this.props.form}>
                <div className="form-group">
                 <h3><span>银行卡信息</span></h3>
                 <Row gutter={24}>
                    <Col sm={12}>
                        <FormItem label="服务费卡"></FormItem>
                    </Col>
                    <Col sm={12}>
                        <FormItem label="放款卡"></FormItem>
                    </Col>
                 </Row>
                    <Row gutter={24}>
                    <Col sm={12}>
                        <FormItem label="银行卡户名">
                            <Input  style={{width: 200}} value='杭州租派信息科技有限公司' disabled/>
                        </FormItem>
                    </Col>
                    <Col sm={12}>
                        <FormItem label="银行卡户名">
                            <Input style={{width: 200}} value={userInfoDetail.payeeName} disabled/>
                        </FormItem>
                    </Col>
                 </Row>
                     <Row gutter={24}>
                    <Col sm={12}>
                        <FormItem label="银行卡号">
                            <Input  style={{width: 200}} value='19020501040011846' disabled/>
                        </FormItem>
                    </Col>
                    <Col sm={12}>
                        <FormItem label="银行卡号">
                            <Input style={{width: 200}} value={userInfoDetail.payeeAccount} disabled/>
                        </FormItem>
                    </Col>
                 </Row>
                         <Row gutter={24}>
                    <Col sm={12}>
                        <FormItem label="开户行">
                            <Input  style={{width: 200}} value='农行杭州竞舟支行' disabled/>
                        </FormItem>
                    </Col>
                    <Col sm={12}>
                        <FormItem label="开户行">
                            <Input style={{width: 200}} value={userInfoDetail.bankName} disabled/>
                        </FormItem>
                    </Col>
                 </Row>
                           <Row gutter={24}>
                    <Col sm={12}>
                        <FormItem label="服务费金额(元)">
                            <Input  style={{width: 200}}  value={!verifyDetail.amount&&!verifyDetail.serviceRate ? '' : (verifyDetail.amount * (verifyDetail.serviceRate*0.01)*(verifyDetail.period/12)).toFixed(2) <0.01 ? 0.01 : (verifyDetail.amount * (verifyDetail.serviceRate*0.01)*(verifyDetail.period/12)).toFixed(2)} disabled/>
                        </FormItem>
                    </Col>
                    <Col sm={12}>
                        <FormItem label="放款金额(元)">
                            <Input style={{width: 200}} value={verifyDetail.amount} disabled/>
                        </FormItem>
                    </Col>
                 </Row>
                  <h3></h3>
                  <Row gutter={24}>
                    <Col sm={12}>
                        <FormItem label="放款时间">
                            <DatePicker  {...getFieldProps('loanTime',{initialValue: applyDetail.isLoan == 2 ? '': loanDetail.loanTime})} disabled={applyDetail.isLoan == 2 ? false : true}/>
                        </FormItem>
                    </Col>
                 </Row>
                    <Row gutter={24}>
                    <Col sm={12}>
                        <FormItem label="审批意见">
                            <Select style={{width: 200}} {...getFieldProps('isLoan',{initialValue: applyDetail.isLoan == 2 ? '': loanDetail.isLoan == 1 ? '已放款' : '拒绝放款'})} disabled={applyDetail.isLoan == 2 ? false : true}>
                                <Option value="1">已放款</Option>
                                <Option value="-1">拒绝放款</Option>
                            </Select>
                        </FormItem>
                    </Col>
                 </Row>
                  <Row gutter={24}>
                    <Col sm={24}>
                        <FormItem label="备注">
                            <Input type="textarea" style={{width: 500}} {...getFieldProps('remark',{initialValue:  applyDetail.isLoan == 2 ? '': loanDetail.remark})} disabled={applyDetail.isLoan == 2 ? false : true}/>
                        </FormItem>
                    </Col>
                 </Row>
                   <Row gutter={24}>
                    <Col sm={24}>
                    {applyDetail.isLoan == 2 ? 
                      <Button type="primary" style={{marginLeft: 330, width:100,marginTop: 20}} onClick={this.handleSubmit}>确定</Button>
                      : 
                      ''
                    }
                        
                    </Col>
                 </Row>
                </div>
              </Form>
              </TabPane>
        </Tabs>
      </Modal>
    )
  }
});

List = Form.create()(List)
export default List